import request from '@/utils/request'


// 查询文件信息列表
export function listInfo(query) {
  return request({
    url: '/shopping/goods/list',
    method: 'get',
    params: query
  })
}

// 查询文件信息详细
export function getInfo(productId) {
  return request({
    url: '/shopping/goods/' + productId,
    method: 'get'
  })
}


// **************************************************



// 查询供应商信息列表
export function listInfosi(query) {
  return request({
    url: '/shopping/supplier/list',
    method: 'get',
    params: query
  })
}

// 查询供应商信息详细
export function getInfosi(supplierId) {
  return request({
    url: '/shopping/supplier/getInfo/' + supplierId,
    method: 'get'
  })
}

// 新增供应商信息
export function addInfosi(data) {
  return request({
    url: '/shopping/supplier',
    method: 'post',
    data: data
  })
}

// 修改供应商信息
export function updateInfosi(data) {
  return request({
    url: '/shopping/supplier',
    method: 'put',
    data: data
  })
}

// 删除供应商信息
export function delInfosi(supplierId) {
  return request({
    url: '/shopping/supplier/' + suppllistInfosiierId,
    method: 'delete'
  })
}


export function typeStatus(supplierId, supplierStatus) {
  const data = {
    supplierId,
    supplierStatus
  }
  return request({
    url: '/shopping/supplier/editStatus',
    method: 'put',
    data: data
  })
}
